package com.qiaofang.applet.service.property.service;

import com.qiaofang.applet.common.base.BaseService;
import com.qiaofang.applet.service.property.domain.Estate;
import com.qiaofang.applet.service.property.domain.EstateComment;
import com.qiaofang.applet.service.property.service.dto.*;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface EstateService extends BaseService<Estate, String> {

    Estate findByEstateUniqueUuid(String estateUniqueUuid);

    Page<Estate> findAllEstateByParams(EstateQueryDto query, Pageable pageable);

    /**
     * 周边小区
     * @param query
     * @param pageable
     * @return
     */
    Page<Estate> getSurroundingEstates(EstateQueryDto query, String estateUniqueUuid, Pageable pageable);

    List<Estate> findAllEstateByParams(EstateQueryDto query);

    Page<EstateListDto> convertDomainToEstateListDto(Page<Estate> propertyPage, String cityCode);

    List<EstateListDto> convertDomainToEstateListDto(List<Estate> propertyPage);

    List<Estate> findEstateDetailsByParams(EstateQueryDto query);

    /**
     * 后台管理系统查询小区列表
     * @param estatePageQueryDto
     * @return
     */
    Page<EstatePageDto> getEstatePage(EstatePageQueryDto estatePageQueryDto, Pageable pageable);
}
